package main

import (
	"math"
	"fmt"
)

type geometry interface {
	areaa() float64
	perimm() float64

}

type rectt struct {
	width,height float64
}

type circle struct {
	radius float64
}

func (r rectt)areaa() float64{
	return r.width*r.height
}

func (r rectt)perimm() float64{
	return 2*r.width+2*r.height
}

func (c circle)areaa()float64{
	return math.Pi*c.radius*c.radius
}

func (c circle)perimm()float64{
	return 2*math.Pi*c.radius
}

func measure(g geometry){
	fmt.Println(g)
	fmt.Println(g.areaa())
	fmt.Println(g.perimm())
}

func main() {
	r:=rectt{width:3,height:4}
	c:=circle{radius:5}

	measure(r)
	measure(c)
}
